package com.cxl.price.bean;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.summer.core.common.BeanName;
import com.summer.core.entity.BaseBean;

@Entity
@BeanName("产品类型")
public class Ptype extends BaseBean{
private static final long serialVersionUID = -1756537880426386801L;
	//上一级
	private Ptype ptype;
	//链接地址
	private String url;
	//所属商店
	private Shop shop;
	//类型名称
	private String name;
	
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@ManyToOne(cascade=CascadeType.REFRESH,fetch = FetchType.LAZY)
	@JoinColumn(name = "ptype_id")
	public Ptype getPtype() {
		return ptype;
	}
	public void setPtype(Ptype ptype) {
		this.ptype = ptype;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	
	@ManyToOne(cascade=CascadeType.REFRESH,fetch = FetchType.LAZY)
	@JoinColumn(name = "shop_id")
	public Shop getShop() {
		return shop;
	}
	
	public void setShop(Shop shop) {
		this.shop = shop;
	}
	
	
	

}
